import React from 'react';
import { Button } from 'antd';
import { message } from 'antd';

import { getTestRequest } from '../../apis/test'

const Dashboard = () => {

  const testApi = () => {
    let params = {
      name: 'test',
    }
    getTestRequest(params).then(res => {
      console.log('发起测试请求===>', res);
      // message.success(res.data.message);
    }).catch(err => {
      console.log('发起测试请求失败===>', err);
    })
  }
  return (
    <div>
      <h1>仪表盘</h1>
      <p>这里是仪表盘内容。</p>

      <Button type="primary" onClick={ testApi }>测试按钮</Button>
    </div>
  );
};

export default Dashboard;